#include("/template/common/layout/_page_layout.html")
#@layout()

#define css()
<style>
    button {
        background: #758ef0;
        color: #FFF;
        border: none;
        border-radius: 15px;
    }
</style>
#end

#define js()
<script type="text/javascript">
    var managementRole = "#(managementRole)";
    layui.use(['form', 'layer', 'layedit'], function () {
        // 操作对象
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , $ = layui.jquery;

        layedit.build('brief', {
            height: 180 //设置编辑器高度
        }); //建立编辑器
        var entry = "#(entry)";
        if("mgr" === entry){
            $("#entries-mgr").removeClass("layui-hide");
            var status = "#(model.status)"

            //项目文件，从立项开始就有可能有项目相关的文件
            $("#pretrial-report").removeClass("layui-hide");
            switch(status){
                case "7":
                    $("#eva-scheme").removeClass("layui-hide");
                    $("#eva-scheme-process").removeClass("layui-hide");
                    break;
                case "6":/*立项中，查看项目资料详情*/

                    break;
                case "5":
                    $("#eva-scheme").removeClass("layui-hide");
                    $("#eva-scheme-process").removeClass("layui-hide");
                    break;
                case "4":
                    $("#eva-scheme").removeClass("layui-hide");
                    $("#eva-scheme-process").removeClass("layui-hide");
                    break;
                case "3":/*审核中*/
                    break;
                case "2":
                    break;
                case "1":
                    break;
            }
        }

        $("#eva-scheme").click(function(){
            console.log(managementRole);
            if (managementRole === '1') {
                pop_show_full("评估方案", "#(ctxPath)/app/projectUndertake/managementReviewSee?id=" + "#(model.id)", function () {
                });
            } else if (managementRole === '0') {
                layer.msg("您尚未认证为管理机构，无法查看。");
            }
        });

        $("#eva-scheme-process").click(function(){
            pop_show_full("评估过程资料","#(ctxPath)/app/evaluation/evaluationInformation_mgr?id=" + "#(model.id)"+ "&entry=mgr",function(){});
        });

        $("#pretrial-report").click(function(){
            pop_show_full("项目文件","#(ctxPath)/app/ass_review/findPageAndShow?projectId=" + "#(model.id)" + "&roleType=2",function(){});
        });

        $("#final-report").click(function(){
            alert("终审报告");
        });

        $("#project-record").click(function(){
            alert("项目备案");
        });

        $("#project-track").click(function(){
            alert("项目跟踪");
        });
    });
</script>
#end

#define content()

<div style="padding: 20px; background-color: #F2F2F2;">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">项目信息
                    <div class="layui-btn-group layui-hide" style="float:right" id="entries-mgr">
                        <button class="layui-btn layui-btn-sm layui-hide" id="eva-scheme">评估方案</button>
                        <button class="layui-btn layui-btn-sm layui-hide" id="eva-scheme-process">评估过程资料</button>
                        <button class="layui-btn layui-btn-sm layui-hide" id="pretrial-report">项目文件</button>
                        <button class="layui-btn layui-btn-sm layui-hide" id="final-report">终审报告</button>
                        <button class="layui-btn layui-btn-sm layui-hide" id="project-record">项目备案</button>
                        <button class="layui-btn layui-btn-sm layui-hide" id="project-track">项目跟踪</button>
                    </div>
                </div>
                <div class="layui-card-body">
                    <form class="layui-form" action="">
                        <div class="layui-row layui-col-space10 layui-form-item">

                            <div class="layui-inline">
                                <label class="layui-form-label">项目名称</label>
                                <div class="layui-input-block" style="width:248px;">
                                    <input type="text" value="#(model.name)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">项目类型</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#(model.typeName)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">预计金额</label>
                                <div class="layui-input-inline">
                                    <input type="text" value="#number(model.amount, ',###')" autocomplete="off" class="layui-input money" readonly/>
                                </div>
                                <div class="layui-form-mid layui-word-aux">（单位：元）</div>
                            </div>
                        </div>

                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">地址</label>
                                <div class="layui-input-block" style="width:975px;">
                                    <input type="text" value="#(model.site)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                        </div>

                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">简介</label>
                                <div class="layui-input-block" style="width:975px;">
                                    <textarea class="layui-textarea" id="brief" name="brief" disabled>#(model.brief)</textarea>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">立项机构信息</div>
                <div class="layui-card-body">
                    <form class="layui-form" action="">
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">名称</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#(organization.name)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label" style="width: 110px;">组织机构代码</label>
                                <div class="layui-input-block" style="margin-left:140px; width:200px;">
                                    <input type="text" value="#(organization.code)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label" style="width: 110px;">地址</label>
                                <div class="layui-input-block" style="margin-left:140px; width: 289px;">
                                    <input type="text" value="#(organization.addr)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row layui-col-space10 layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">负责人姓名</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#(organization.principal)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label" style="width: 110px;">联系方式</label>
                                <div class="layui-input-block" style="margin-left:140px; width:200px;">
                                    <input type="text" value="#(organization.contact)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label" style="width: 110px;">立项所用身份</label>
                                <div class="layui-input-block" style="margin-left:140px; width: 289px;">
                                    <input type="text" value="#(roleName)" autocomplete="off" class="layui-input" readonly/>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
#end